<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>点点折实时统计</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"  >
        <link href="css/bootstrap-responsive.css" rel="stylesheet">
        <!-- Bootstrap -->
        <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link rel="stylesheet" href="css/font-awesome.min.css">
        <script src="js/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="my97date/WdatePicker.js"></script>

    </head>
    <body >
        <!-- <iframe name="alimamaifrm" frameborder="0" marginheight="0" marginwidth="0" border="0" scrolling="no" width="950" height="30" src="http://www.taobao.com/go/app/tbk_app/chongzhi_950_30.php?pid=mm_30820461_3255384_10837480&page=chongzhi_950_30.php&size_w=950&size_h=30&stru_phone=1&stru_game=1&stru_travel=1" ></iframe> -->
        <div class="container-fluid">

            <div class="row-fluid" >
                <h4>结算统计</h4>

                <p>
                    <form action="?c=mbops&a=index" method="post" class="form-inline ">
                        <input type="text" name="mydate" readonly onClick="WdatePicker()" style="width: 100px;" autocomplete="off" value="查询日期"/>
                        <button type="submit" class="btn btn-success">
                            查询
                        </button>
                    </form>
                </p>
                <a href="http://api.diandianzhe.com/corner/service/remote/rest/order_upload.htm" target="_blank" class="btn btn-info"  id="btn_syn_order">同步实时订单</a>
                <p>
                    <li class="icon-ok"></li>
                    未结算现金
                </p>
                <p>
                    共【<{$ttl_cash_cnt}>】 条 合计【￥<{$ttl_cash}>】
                </p>
                <p>
                    <li class="icon-ok"></li>
                    未结算集分宝
                </p>
                <p>
                    共【<{$ttl_jfb_cnt}>】 条 合计【￥<{$ttl_jfb}>】
                </p>
            </div>

            <div class="row-fluid" >
                <h4></h4>
                <p>
                    <li class="icon-ok"></li>
                    实时订单
                    <br>
                    <small >【<{$ttl_real_date}>】</small>
                </p>
                <p>
                <p>
                    共【<{$ttl_real_cnt}>】 条

                    合计【￥<{$ttl_real_commission}>】
                <p></p>
                <p>
                    <li class="icon-ok"></li>
                    实时确认收货
                <p>
                    共【<{$ttl_cnt_confirm}>】 条

                    合计【￥<{$ttl_sum_confirm}>】
                </p>
                </p>
            </div>

            <div class="row-fluid">

                <input type="button" id="date_start"  onClick="WdatePicker()" style="width: 100px;" autocomplete="off" autocorrect="off" autofocus="off" value="开始日期" />

                <button class="btn btn-primary" id="btn_ttl">
                    统计
                </button>
                <p>
                    本月打款，共：【<span id="ttl_cnt_pay"></span>】条，合计：【￥<span id="ttl_sum_pay"></span>】,日均:【￥<span id="avg_pay"></span>】
                </p>
                <p>
                    现金打款，共：【<span id="ttl_cnt_pay_cash"></span>】条，合计：【￥<span id="ttl_sum_pay_cash"></span>】
                </p>
                <p>
                    集分宝打款，共：【<span id="ttl_cnt_pay_jfb"></span>】条，合计：【￥<span id="ttl_sum_pay_jfb"></span>】
                </p>

                <p>
                    未提现资金余额合计：【￥<span id="ttl_sum_balance"></span>】
                </p>
            </div>

        </div>

        <!-- bootstrap js -->
        <script>
            $(document).ready(function() {

                $("#btn_ttl").click(function() {
                    var date_start = $("#date_start").val();
                    $.getJSON('?c=mbops&a=sum_pay&date_start=' + date_start, function(data) {
                        $("#ttl_cnt_pay_cash").html(data['ttl_cnt_pay_cash']);
                        $("#ttl_sum_pay_cash").html(data['ttl_sum_pay_cash']);
                        $("#ttl_cnt_pay_jfb").html(data['ttl_cnt_pay_jfb']);
                        $("#ttl_sum_pay_jfb").html(data['ttl_sum_pay_jfb']);
                        $("#ttl_cnt_pay").html(data['ttl_cnt_pay']);
                        $("#ttl_sum_pay").html(data['ttl_sum_pay']);
                        $("#avg_pay").html(data['avg_pay']);
                        $("#ttl_sum_balance").html(data['ttl_sum_balance']);
                    })
                });
               

            });
        </script>

    </body>
</html>